package cn.haigui.icrawler.core;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.experimental.Accessors;
import org.jsoup.nodes.Document;

import java.time.LocalDateTime;
import java.util.List;

@Accessors(fluent = true)
@Data
public class Context {

    private String taskName;

    private String pageSource;

    private Document document;

    private JSONObject result;

    /**
     * 目标url
     */
    private String targetUrl;
    /**
     * 现在url
     */
    private String currentUrl;
    /**
     * 开始抓取时间
     */
    private LocalDateTime startTime;

    /**
     * 加载完成时间。所有的productPipeline执行完成
     */
    private LocalDateTime loadedTime;

    /**
     * 新的从页面解析出来的要抓取的url
     */
    private List<String> newTargetUrls;

}
